import taichi as ti

ti.init()



@ti.kernel
def fill():
    for i in range(10):
        x[i] += i

        s = 0
        for j in range(5):
            s += j
        y[i] = s

@ti.kernel
def fill_3d():
    # 3<=i<8 1<=j<6 0<=k<9
    for i,j,k in ti.ndrange((3,8),(1,6),9):
        x[i,j,k] = i+k+j

x = ti.field(dtype=ti.f32,shape=(6,9,8))
y = ti.field(dtype=ti.f32,shape=10)
fill_3d()
print(x)
print(y)
